import { GET_RES_INFO } from './actionTypes.js';
import axios from 'axios';

const getData = (obj) => {
    return {
        type: GET_RES_INFO,
        obj: obj
    }
}

// 获取商家信息
export const getCommentData = () => (dispatch) => {
    axios({
        method: 'get',
        url: './json/restanurant.json'
    }).then((res) => {
        dispatch(getData({
            data: res.data.data, // 存入数据
        }))
    })
}
